package com.demo.starter.domain.vo;

import com.demo.starter.entity.Article;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class ArticleDetailVO implements Serializable {

    private Long id;
    private String title;
    private String summary;
    private String source;
    private String thumbnail;
    private String author;
    private Date publishTime;
    private Integer countView;
    private String body;

    public ArticleDetailVO(Article a) {
        this.id = a.getId();
        this.title = a.getTitle();
        this.thumbnail = a.getThumb();
        this.author = a.getAuthor();
        this.summary = a.getDescription();
        this.source = a.getSource();
        this.publishTime = a.getPublishDatetime();
        this.countView = a.getCountView();
    }

}
